package com.yantong.mapper;

import com.yantong.pojo.Activity;
import com.yantong.pojo.ActivityExample;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import java.util.List;
import java.util.Map;

public interface ActivityMapper {
    long countByExample(ActivityExample example);

    int deleteByExample(ActivityExample example);

    int deleteByPrimaryKey(Long id);

    int insert(Activity record);

    int insertSelective(Activity record);

    List<Activity> selectByExample(ActivityExample example);

    List<Activity> selectByExample(ActivityExample example, RowBounds rowBounds);

    Activity selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") Activity record, @Param("example") ActivityExample example);

    int updateByExample(@Param("record") Activity record, @Param("example") ActivityExample example);

    int updateByPrimaryKeySelective(Activity record);

    int updateByPrimaryKey(Activity record);

    List<Activity> pageListBycondition(Map<String, Object> map, RowBounds rowBounds);

    List<Activity> selectListByStoreFreechargeId(@Param("storeFreechargeId") Long storeFreechargeId);

    int queryTotal(Map<String, Object> map);

    Activity getActivityByShopId(Map<String, Object> map);

    List<Activity> selectActivityList(@Param("handselProductAuthorityId") Long handselProductAuthorityId, RowBounds rowBounds);

    int countActivityListSize(@Param("handselProductAuthorityId") Long handselProductAuthorityId);

    List<Activity> selectActivityListByShopProductAuthorityId(@Param("shopProductAuthorityId") Long shopProductAuthorityId, RowBounds rowBounds);

    int countActivityListByShopProductAuthorityId(@Param("shopProductAuthorityId") Long shopProductAuthorityId);

    int changeStock(@Param("total") Integer total, @Param("activityId") Long activityId);
}